package com.joker.aigc.blog.domain.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.joker.aigc.domain.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @TableName article_comment
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "文章类")
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "article_comment")
public class ArticleCommentPO extends BaseEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 博客id
     */
    private Long articleId;

    /**
     * 根评论id，-1代表是根评论
     */
    private Long rootId;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 评论者uid
     */
    private Long fromUid;

    /**
     * 被回复者uid
     */
    private Long toUid;

    /**
     * 这条评论是回复哪条评论的，只有子评论才有（子评论的子评论，树形）
     */
    private Long toCommentId;

    /**
     * 评论点赞数
     */
    private Integer likeCount;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}